function S = gaussianSimilarity(X, varargin)
    par.sigma = 1;
    % TODO: knn, e-nn graph
    par = process_parameter(par, varargin{:});
    
    S = exp( -dist(X') / (2*par.sigma*par.sigma) );
    S(S < 1e-8) = 0;
    S = sparse(S);
end
